#!/bin/bash
# Author: yanjingtu <yanjingtu2008@yeah.net>
# Date: 2020/7/24
# Url: https://gitee.com/yanjingtu/centos-dockerfiles/tree/master/scripts/

# ENV
GO_VERSION=1.14.6
GO_ARCH=amd64

# run command
curl https://mirrors.ustc.edu.cn/golang/go$GO_VERSION.linux-$GO_ARCH.tar.gz | tar -C /opt -xz
ln -s /opt/go/bin/go /usr/bin/go
ln -s /opt/go/bin/gofmt /usr/bin/gofmt

go env -w GOPROXY="https://mirrors.aliyun.com/goproxy/"
go env -w GO111MODULE=on
#chmod +x /etc/profile.d/goproxy.sh
#source /etc/profile.d/goproxy.sh
